package com.hcy.driver.Impl;

import com.hcy.driver.DriverBaseInfo;
import com.hcy.driver.dto.request.BaseInfoRequestDTO;
import com.hcy.driver.dto.response.DriverCarInfoResponseDTO;
import com.hcy.driver.service.ICarInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author huchenying
 * @Description
 * @Date 2022/3/2 23:00
 */
@Service
public class DriverBaseInfoImpl implements DriverBaseInfo {

    @Autowired
    ICarInfoService carInfoService;

    @Override
    public boolean driverUpdate(BaseInfoRequestDTO baseInfoRequestDTO) {
        return carInfoService.updateCarStatus(baseInfoRequestDTO);
    }

    @Override
    public DriverCarInfoResponseDTO getDriverCarInfo(Integer driverId) {
        return carInfoService.getDriverCarInfo(driverId);
    }

    @Override
    public DriverCarInfoResponseDTO carDriverInfo(Integer carId) {
        return carInfoService.carDriverInfo(carId);
    }

    @Override
    public List<DriverCarInfoResponseDTO> carDriverInfoList(List<Integer> carIds) {
        return carInfoService.carDriverInfoList(carIds);
    }
}
